{include file="common/_meta" /}
<title>公告列表</title>
</head>

<body>
    <nav class="breadcrumb">
        <i class="Hui-iconfont">&#xe67f;</i> 首页
        <span class="c-gray en">&gt;</span> 留言管理
        <span class="c-gray en">&gt;</span> 留言列表
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);"
            title="刷新">
            <i class="Hui-iconfont">&#xe68f;</i>
        </a>
    </nav>
    <div class="page-container">
        <div class="text-c">
            <form class="Huiform" method="get" action="">
                状态：
                <span class="select-box inline">
                    <select name="status" class="select">
                        <option value="">全部</option>
                        <option value="0" style="color:red;">未处理</option>
                        <option value="1">已处理</option>
                    </select>
                </span>
               <!--   分类：
                <span class="select-box inline">
                    <select name="cate_id" class="select">
                        <option value="">全部</option>
                        {volist name="cate" id="vo"}
                        <option value="{$vo.id}">{$vo.cate_name}</option>
                        {/volist}
                    </select>
                </span> -->
       
                <input type="text" class="input-text" style="width:250px" placeholder="关键词" name="keywords" value="{$Request.get.keywords|default=''}">
                <input type="text" class="input-text" name="page" value="1" style="display: none;">
                <button type="submit" class="btn btn-success radius" id="" name="">
                    <i class="Hui-iconfont">&#xe665;</i> 搜索</button>
            </form>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <!-- <a class="btn btn-primary radius" onclick="product_edit('添加产品','add')" href="javascript:;"><i class="Hui-iconfont"></i> 添加产品</a>  -->
            <span class="r">共有数据：
                <strong>{$list->total()}</strong> 条</span>
        </div>
        <div class="mt-20">
            <table class="table table-border table-hover  table-bg table-sort">
                <thead>
                    <tr class="text-c">
                        <th width="25">
                            <input type="checkbox" name="" value="">
                        </th>
                        <th>编号</th>
                        <th>会员信息</th>
                        <th>标题</th>
                        <th>留言内容</th>
                        <th>留言时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    {volist name="list" id="vo"}
                    <tr class="text-c">
                        <td>
                            <input name="" type="checkbox" value="">
                        </td>
                        <td width="40px">{$i}</td>
                        <td>{$vo.user.name} : {$vo.user.tel}</td>
                        <td>{$vo.title}</td>
                        <td>{$vo.content}</td>
                        <td>{$vo.create_time}</td>
                        <td class="td-status">
                            {if condition="$vo.status eq 1"}
                            <span class="label label-success radius">已处理</span>
                            {else/}
                            <span class="label label-error radius">未处理</span>
                            {/if}
                        </td>
                        <td class="f-14 td-manage">
                            &nbsp;&nbsp;&nbsp;
                            {if condition="$vo['status'] eq 0"}
                            <a style="text-decoration:none" onclick="done({$vo.id},-1)" href="javascript:;" title="确认处理">
                                <i class="Hui-iconfont">&#xe6df;</i>
                            </a>
                            {/if}
                            &nbsp;&nbsp;&nbsp;
                        </td>
                    </tr>
                    {/volist}
                </tbody>
            </table>
            <div class="pages" style="margin:20px;float: right; ">{$list->render()}</div>
        </div>
    </div>

    {include file="common/_footer" /}
    <script type="text/javascript">
        var flag = 1;
        function done(id, status) {
            if (flag) {
                flag = 0;
                $.post("{:url('Notice/msgList')}?act=done", { id: id, status: status }).success(function (data) {
                    layer.msg(data.msg);
                    if (data.code) {
                        setTimeout(function () {
                            history.go(0);
                        }, 500);

                    } else {
                        flag = 1;
                    }
                });
            } else {
                layer.msg('请勿重复操作！');
            }
        }
    </script>
</body>

</html>